package com.msy.mai.module.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.msy.mai.module.system.convert.SysClientConvert;
import com.msy.mai.module.system.entity.domain.SysClient;
import com.msy.mai.module.system.entity.vo.SysClientVo;
import com.msy.mai.module.system.mapper.SysClientMapper;
import com.msy.mai.module.system.service.SysClientService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author Wang
* @description 针对表【sys_client(系统授权表)】的数据库操作Service实现
* @createDate 2024-10-27 16:03:14
*/
@Service
//@RequiredArgsConstructor
public class SysClientServiceImpl extends ServiceImpl<SysClientMapper, SysClient>
    implements SysClientService {

    @Autowired
    private  SysClientMapper sysClientMapper;

    @Override
    public SysClientVo queryClientVOById(String clientId) {
        SysClient sysClient = sysClientMapper.selectOne(
                new LambdaQueryWrapper<SysClient>().eq(SysClient::getClientId, clientId)
        );
        return  sysClient == null ? null : SysClientConvert.MAPPER.to(sysClient);
    }
}




